<?php

declare(strict_types=1);

namespace App\Controller\Admin;
use App\Controller\AbstractController;
use Hyperf\HttpServer\Annotation\AutoController;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\HttpServer\Annotation\Middleware;
use Hyperf\HttpServer\Annotation\Middlewares;
use App\Middleware\AdminMiddleware;
use App\Model\Banner as ModelBanner;

/**
 * @AutoController(prefix="/admin/banner")
 * @Middlewares({
 *     @Middleware(AdminMiddleware::class)
 * })
 */
class Banner extends AbstractController
{
    public function list() {
        $list = ModelBanner::query()->get();
        return $this->success($list);
    }
}
